-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add RT700 basic environment support #79376
base: main
Are you sure you want to change the base?
Add RT700 basic environment support #79376
Conversation
The following west manifest projects have changed revision in this Pull Request:
⛔ DNM label due to: 1 project with PR revision Note: This message is automatically posted and updated by the Manifest GitHub Action. |
aebb39a
to
a8fc58d
Compare
high-performance numerical tasks such as audio and image processing and supports both fixed-point and | ||
floating-point operations. | ||
|
||
Note: Due to board isn't launched, the picture is blank |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just don't include an image? I'm not aware of a requirement that we actually have one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was announced - maybe you can find a picture here: https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/i-mx-rt-crossover-mcus/i-mx-rt700-crossover-mcu-with-arm-cortex-m33-npu-dsp-and-gpu-cores:i.MX-RT700
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only release RT700 soc, EVK board don't launch currently. We can't show the board picture currently.
boards/nxp/mimxrt700_evk/mimxrt700_evk_mimxrt798s_cpu1_defconfig
Outdated
Show resolved
Hide resolved
boards/nxp/mimxrt700_evk/mimxrt700_evk_mimxrt798s_cpu1_defconfig
Outdated
Show resolved
Hide resolved
boards/nxp/mimxrt700_evk/mimxrt700_evk_mimxrt798s_cpu0_defconfig
Outdated
Show resolved
Hide resolved
config XSPI_CONFIG_BLOCK_OFFSET | ||
hex "XSPI config block offset" | ||
default 0x0 | ||
help | ||
XSPI configuration block consists of parameters regarding specific | ||
flash devices including read command sequence, quad mode enablement | ||
sequence (optional), etc. The boot ROM expects XSPI configuration | ||
parameter to be presented in serial nor flash. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this not in dts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not addressed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this make sense for DTS? It is a software setting for the offset of the XSPI configuration block, which will then be used by the bootrom to configure the XSPI to interface with an external flash device and execute from it
Hi @hakehuang , Could you help test all the LPC and RT3 digitals platforms based on this PR? I have updated iocon driver and pin header file for RT700. Thank you. |
sure, I kick another round of testing, will feedback once done
|
2334439
to
59930f1
Compare
string | ||
prompt "Xspi drivers memory location" | ||
default "RAM" | ||
help | ||
Select the location to run the XSPI drivers when using | ||
the flash API. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems like this should be choice options not a string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it should be string because it will be used in cmake files, need to specifies the name of the region
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not understanding this, the region? What region? What possible values can this Kconfig have and what does it do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the reason this wasn't made a choice is because different platforms have a different set of options for where the flash drivers could be relocated to. IE M7 parts support relocating to ITCM, but M33 parts can only really relocate to the RAM region.
Maybe we could define the choice here, and make options like "ITCM" dependent on the SOC devicetree defining an ITCM devicetree node?
config XSPI_CONFIG_BLOCK_OFFSET | ||
hex "XSPI config block offset" | ||
default 0x0 | ||
help | ||
XSPI configuration block consists of parameters regarding specific | ||
flash devices including read command sequence, quad mode enablement | ||
sequence (optional), etc. The boot ROM expects XSPI configuration | ||
parameter to be presented in serial nor flash. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not addressed
Hi @danieldegrasse , |
59930f1
to
f727098
Compare
track rt700 sdk files update PR branch Signed-off-by: Lucien Zhao <[email protected]>
add rt7xx files related to soc support basic clock enablement add HAS_MCUX_XSPI/HAS_GLIKEY Kconfig add common/Kconfig.xspi_xip file Signed-off-by: Lucien Zhao <[email protected]>
add RT7xx dts files add iocon/gpio/flexcomm/clock instances in dts Signed-off-by: Lucien Zhao <[email protected]>
add nxp,imx-xspi-device.yaml add nxp,imx-xspi-mx25um51345g.yaml add nxp,imx-xspi.yaml Signed-off-by: Lucien Zhao <[email protected]>
add more flexcomm instances clock support to adapt rt700 instances number add xspi clock support Signed-off-by: Lucien Zhao <[email protected]>
Due to there is no port on RT7xx soc, update driver to adapt rt7xx pin mux model(Use IOPCTL_PinMuxSet function to configure pinmux set) Signed-off-by: Lucien Zhao <[email protected]>
update gpio driver to adapt rt7xx gpio model: 1. There is no PORT_Type on RT7xx,so set PORT_Type as void 2. Add port_no parameter in gpio_mcux_config to adapt IOPCTL driver 3. Add gpio-port-offest parameter in blinding, it will help map the relation between index n and gpio port when some soc have domain access attribution. 4. Add code to adapt RT700 GPIO attribute configuration Signed-off-by: Lucien Zhao <[email protected]>
add files related to mimxrt700_evk board add gpio/uart function support on board Signed-off-by: Lucien Zhao <[email protected]>
The number of mpu regions that can be configured is less than four cases. Therefore, only remove this case on cm33 cores, failed log show below: "num_parts of 4 exceeds maximum allowable partitions (3)" Signed-off-by: Lucien Zhao <[email protected]>
f727098
to
49c18a5
Compare
Hi Hake, |
Hi @danieldegrasse , could you help review the current pinctrl model? Thank you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IOCON driver changes generally look good, thank you for this update
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit on this commit message- please update to something like the following:
manifest: update hal_nxp revision
@@ -394,4 +394,9 @@ config NXP_RF_IMU | |||
help | |||
RF_IMU adapter is needed for intercore messaging. | |||
|
|||
config HAS_GLIKEY |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the GLIKEY something we could describe in the devicetree? The HAS_XXX
Kconfigs are typically legacy Kconfigs from before we had the DT_HAS_xxx_ENABLED
Kconfigs, which functionally replaced these
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, we can't describe it in dts, there is no driver supported. I will migrate Kconfig defined under rt7xx folder and modify the kconfig name to GLIKEY_MCUX_GLIKEY.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can still have a devicetree node without a specific driver- for example, I've done this for PLL configurations within SOCs:
zephyr/soc/nxp/imxrt/imxrt10xx/soc.c
Line 45 in e60f040
const clock_sys_pll_config_t sysPllConfig = { |
# Copyright 2024 NXP |
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
DT_CHOSEN_Z_FLASH := zephyr,flash | ||
DT_COMPAT_XSPI := nxp,imx-xspi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's avoid using imx
in the compatible name- simply nxp,xspi
would work
string | ||
prompt "Xspi drivers memory location" | ||
default "RAM" | ||
help | ||
Select the location to run the XSPI drivers when using | ||
the flash API. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the reason this wasn't made a choice is because different platforms have a different set of options for where the flash drivers could be relocated to. IE M7 parts support relocating to ITCM, but M33 parts can only really relocate to the RAM region.
Maybe we could define the choice here, and make options like "ITCM" dependent on the SOC devicetree defining an ITCM devicetree node?
config XSPI_CONFIG_BLOCK_OFFSET | ||
hex "XSPI config block offset" | ||
default 0x0 | ||
help | ||
XSPI configuration block consists of parameters regarding specific | ||
flash devices including read command sequence, quad mode enablement | ||
sequence (optional), etc. The boot ROM expects XSPI configuration | ||
parameter to be presented in serial nor flash. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this make sense for DTS? It is a software setting for the offset of the XSPI configuration block, which will then be used by the bootrom to configure the XSPI to interface with an external flash device and execute from it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit message here needs to be updated, IOPCTL_PinMuxSet
function is not being used
@@ -11,22 +11,40 @@ | |||
#include <fsl_clock.h> | |||
#endif | |||
|
|||
/* IOCON register addresses. */ | |||
static uint32_t *iocon[] = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
static uint32_t *iocon[] = { | |
static uint32_t *volatile iocon[] = { |
I think the pointers in this array need to be declared as volatile still
{ | ||
for (uint8_t i = 0; i < pin_cnt; i++) { | ||
uint32_t pin_mux = pins[i]; | ||
uint32_t offset = OFFSET(pin_mux); | ||
uint32_t index = INDEX(pin_mux); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to use uint32_t
here, this can be a uint8_t
based on mask width, right?
{ | ||
const struct gpio_mcux_config *config = dev->config; | ||
GPIO_Type *gpio_base = config->gpio_base; | ||
|
||
#if defined(CONFIG_PINCTRL_NXP_IOCON) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps rather than doing all this #ifdef
'ery, could we split the pin control settings into two functions?
gpio_mcux_port_configure
gpio_mcux_iopctl_configure
Then we could simply have one ifdef
in this function, and call the correct helper
\ | ||
static int gpio_mcux_port## n ##_init(const struct device *dev) \ | ||
{ \ | ||
#define GPIO_PORT_NUMBER(n) COND_CODE_1(DT_INST_NODE_HAS_PROP(n, gpio_port_offest), \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If possible splitting the formatting changes here (which seem to be from running clang-format) out from the functional changes to the driver would make this easier to review. If not, just be aware that is best practice in the future (not to mix formatting changes and functional ones in the same commit)
.. _mimxrt700_evk: | ||
|
||
NXP MIMXRT700-EVK | ||
################## |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check board template (i.e. use zephyr:board
directive here) and set full_name in the board.yml (you may look at how it's done for other NXP boards)
Also consider including an image for the board
support gpio/uart function